/*
* Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Base class for containers.
*
*/

// INCLUDE FILES
#include <math.h>
#include <gdi.h> // CFont
#include <AknDef.h>
#include <AknUtils.h> // Pen support.
#include "cameralitytraces.h"
#include "cameralityappui.h"
#include "cameralitybasecontainer.h"

// ================= MEMBER FUNCTIONS =======================

/*!
* Constructor.
*/
CCameralityBaseContainer::CCameralityBaseContainer()
    {
    }

/*!
* Second phase constructor for inherited classes.
*/
void CCameralityBaseContainer::DoConstructL()
    {
    TRACE_ENTER();
    iAppUi = dynamic_cast<CCameralityAppUi*>(CEikonEnv::Static()->AppUi());

    // Create the native window
    CreateWindowL(iCoeEnv->RootWin());
    Window().SetOrdinalPosition(0, ECoeWinPriorityNormal);
    MakeVisible(EFalse);
    TRACE_EXIT();
    }

/*!
* Destructor.
* Releases any used resources.
*/
CCameralityBaseContainer::~CCameralityBaseContainer()
    {
    }

/*!
* Normal CCoeControl drawing method.
*/
void CCameralityBaseContainer::Draw(const TRect& /*aRect*/) const
    {
    TRACE_ENTER();
    TRACE_EXIT();
    }

/*!
* Show this control.
* @param aExtent Extent of this container.
*/
void CCameralityBaseContainer::Show(const TRect& aExtent)
    {
    TRACE_ENTER();
    SetRect(aExtent);
    MakeVisible(ETrue);
    ActivateL();
    TRACE_EXIT();
    }

/*!
* Hide this control.
*/
void CCameralityBaseContainer::Hide()
    {
    MakeVisible(EFalse);
    }

/*!
* Raise this control to top.
*/
void CCameralityBaseContainer::Raise()
    {
    TRACE_VISIT();
    Window().SetOrdinalPosition(0);
    }

// End of File
